package com.party.core.model.mall;

import com.party.core.model.BaseModel;

/**
 * 展示商品类型
 * Created by wei.li
 *
 * @date 2017/8/24 0024
 * @time 15:10
 */
public class MallShowCategory extends BaseModel{

    //类型名称
    private String name;

    //父级编号
    private String parentId;

    //父级编号串
    private String parentIds;

    //排序
    private Integer sort;

    //图片
    private String pic;

    //专题编号
    private String subjectId;

    // 模板编号
    private String templateId;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentIds() {
        return parentIds;
    }

    public void setParentIds(String parentIds) {
        this.parentIds = parentIds;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(String subjectId) {
        this.subjectId = subjectId;
    }

    public String getTemplateId() { return templateId; }

    public void setTemplateId(String templateId) { this.templateId = templateId; }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof MallShowCategory)) return false;
        if (!super.equals(o)) return false;

        MallShowCategory that = (MallShowCategory) o;

        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
        if (parentIds != null ? !parentIds.equals(that.parentIds) : that.parentIds != null) return false;
        if (sort != null ? !sort.equals(that.sort) : that.sort != null) return false;
        if (pic != null ? !pic.equals(that.pic) : that.pic != null) return false;
        if (subjectId != null ? !subjectId.equals(that.subjectId) : that.subjectId != null) return false;
        return templateId != null ? templateId.equals(that.templateId) : that.templateId == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (parentId != null ? parentId.hashCode() : 0);
        result = 31 * result + (parentIds != null ? parentIds.hashCode() : 0);
        result = 31 * result + (sort != null ? sort.hashCode() : 0);
        result = 31 * result + (pic != null ? pic.hashCode() : 0);
        result = 31 * result + (subjectId != null ? subjectId.hashCode() : 0);
        result = 31 * result + (templateId != null ? templateId.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "MallShowCategory{" +
                "name='" + name + '\'' +
                ", parentId='" + parentId + '\'' +
                ", parentIds='" + parentIds + '\'' +
                ", sort=" + sort +
                ", pic='" + pic + '\'' +
                ", subjectId='" + subjectId + '\'' +
                ", templateId='" + templateId + '\'' +
                '}';
    }
}
